const fs = require('fs');
const path = require('path');
const morgan = require('morgan');
const formatDate = require('./formatDate-util')
let date = formatDate.getFormatDate();
//output file
var accessLogStream = fs.createWriteStream(path.join(__dirname, '../../log/http',date+'.log'), {flags: 'a'});
var logger = morgan('common', {stream: accessLogStream});

module.exports = logger;
